package ru.romannep.and.chopperbattle;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;

public class ChopperBattleMain extends Activity implements OnClickListener{
	public static String TAG = "ChopperBattleMain";
	public static int FPS = 25;
	public static int MS_PER_CYCLE = 1000/FPS;

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        findViewById(R.id.button_start).setOnClickListener(this);
        findViewById(R.id.button_about).setOnClickListener(this);
        findViewById(R.id.button_exit).setOnClickListener(this);
        findViewById(R.id.button_network).setOnClickListener(this);
    }

	public void onClick(View v) {
		
		Log.v(TAG,"clicked on id =" + v.getId());

		switch (v.getId()) {
		case R.id.button_about:
			startActivity(new Intent(this, About.class));
			break;
		case R.id.button_exit:
			Log.v(TAG,"Exiting");
			finish();
			break;
		case R.id.button_start:
			startActivity(new Intent(this, Game.class));
			break;
		case R.id.button_network:
			startActivity(new Intent(this, Network.class));

		default:
			break;
		}
		
	}
}